﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="WebApp.Login" EnableViewStateMac="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>系统登录</title>
    <style type="text/css">
        <!
        -- .imgBtn
        {
            cursor: hand;
        }
        body
        {
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            background-color: #003474;
        }
        body, td, th
        {
            font-size: 12px;
        }
        -- ></style>

    <script type="text/javascript" language="javascript" src="js/prototype.js"></script>

    <script type="text/javascript">
    function checkLogin()
    {           
        if($("txt_login_name").value=="")
        {
            alert("请输入用户名");
            $("txt_login_name").focus();
             return false;
        }
        if($("txt_user_pwd").value=="")
        {
            alert("请输入密码");
            $("txt_user_pwd").focus();
            return false;
        }
        if($("txt_yzm").value=="")
        {
            alert("请输入验证码");
            $("txt_yzm").focus();
            return false;
        }
        return true;
    }
        
    function fefreshCode()
    {
        document.getElementById('vcodeimg').src='CheckCode.aspx?time=' + Math.random();
    }
    
    function initsize()
    {
//        document.getElementById("tbl").style.marginTop=(document.documentElement.clientHeight-394)/2+"px";
//        if (window.top.location!=document.location)
//        {
//            window.top.location="Default.aspx";
//        }
    }
    
    </script>

</head>
<body onload="initsize()" style="margin: 0px;">
    <form id="form1" runat="server">
    <table id="tbl" width="990" height="559" border="0" align="center" cellpadding="0"
        cellspacing="0">
        <tr>
            <td valign="top" background="images/mainbg1.jpg">
                <table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="155" height="278">
                            &nbsp;
                        </td>
                        <td style="width: 185px">
                            &nbsp;
                        </td>
                        <td width="160">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td height="33">
                            &nbsp;
                        </td>
                        <td style="width: 185px">
                            <input id="txt_login_name" type="text" runat="server" style="width: 167px" />
                        </td>
                        <td rowspan="2">
                            <asp:ImageButton ID="ImgBtnLogin" runat="server" ImageUrl="images/loginbt.gif" OnClick="ImgBtnLogin_Click"
                                OnClientClick="return checkLogin();" />
                        </td>
                    </tr>
                    <tr>
                        <td height="33">
                            &nbsp;
                        </td>
                        <td style="width: 185px">
                            <input id="txt_user_pwd" type="password" runat="server" style="width: 167px" />
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 33px">
                        </td>
                        <td style="height: 33px; width: 185px;">
                            <table border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="height: 33px; width: 75px;">
                                        <asp:TextBox ID="txt_yzm" runat="server" Width="65px"></asp:TextBox>
                                    </td>
                                    <td style="height: 33px; width: 60px;">
                                        <img id="vcodeimg" src="CheckCode.aspx" style="cursor: pointer" align="middle" onclick="document.getElementById('vcodeimg').src='CheckCode.aspx?time=' + Math.random();" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td style="height: 33px">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td style="width: 185px">
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
